<?php 
    $categoryList = $this->categoryList;
    $searchCond = $this->searchCond;         
?>
            <!--Start: findEvent-->
            <div class="boxed">
                <div class="boxTop border-radius-top">
                    <div class="boxName"><img src="/assets/images/icons/spacer.gif" width="19" height="21" alt="cuoc song" class="icon_Event icon_suKien-chuyenMuc" /><h4>Tìm kiếm</h4></div>
                </div>
                <div class="boxBody searchEvent">
                  <!--  <form action="/event/search" method="post" name="popupform2">     -->
                <!--va-->    <form action="/event/search" method="post" name="popupform2">
                    <table border="0" cellspacing="0" cellpadding="0" class="tbEvent" style="width:80%;">
                        <tr>
                            <td height="30" align="right">Nhập từ khóa</td>
                            <td><input type="text" name="keyword" value="<?php echo $searchCond['keyword'];?>" id="keyword" class="inputEvent"/></td>
                            <td align="right">Chuyên mục</td>
                            <td>
                                <select name="cid" id="cid" class="selectMedium">
                                    <option value="0">Tất cả</option>
                                <?php 
                                for($i=0; $i<count($categoryList); $i++){
                                    $category = $categoryList[$i];
                                ?>
                                    <option value="<?php echo $category->tid;?>"<?php if($searchCond['cid']==$category->tid) echo " selected=\"selected\"";?>><?php echo $category->name;?></option>
                                <?php 
                                }
                                
                                ?>
                                </select>
                            </td>

                <!--va-->
                        <td>          
                        <span>Cộng đồng</span> <span id="nw_name"></span>                 
                        <script type="text/javascript">
                            $(document).ready(function() {
                                $("#various3").fancybox({
                                    'width'                : '75%',
                                    'height'            : '75%',
                                    'autoScale'            : false,
                                    'transitionIn'        : 'none',
                                    'transitionOut'        : 'none',
                                    'type'                : 'iframe'
                                });


                            });
                        </script>
                        <a id="various3" href="/event/network/1" class="chon-cong-dong">Chọn cộng đồng</a>
                        <input type="hidden" id="nwid" name="nwid">
                        </td>
                <!--va-->
                        </tr>
                        <tr>
                            <td align="right">Từ ngày</td>
                            <td>
                                <input type="text" name="start_time" id="start_time" value="<?php echo $searchCond['start_time'];?>"  class="inputEvent"  style="width:70px;"/>
                                <a href="javascript:void();" id="start_time_trigger"><img src="<?php echo EVENT_STATIC_SERVER;?>/images/dateImage.jpg" width="13" height="12" /></a>
                                <script type="text/javascript">
                                  new Calendar({
                                          inputField: "start_time",
                                          dateFormat: "%d/%m/%Y",
                                          trigger: "start_time_trigger",
                                          bottomBar: false,
                                          onSelect: function() {
                                                  var date = Calendar.intToDate(this.selection.get());
                                                  LEFT_CAL.args.min = date;
                                                  LEFT_CAL.redraw();
                                                  this.hide();
                                          }
                                  });
                                </script>
                                <span style="margin-left:20px;">đến ngày</span>
                                <input type="text" name="end_time" id="end_time" value="<?php echo $searchCond['end_time'];?>" class="inputEvent" style="width:70px;" />            
                                <a href="javascript:void();" id="end_time_trigger"><img src="<?php echo EVENT_STATIC_SERVER;?>/images/dateImage.jpg" width="13" height="12" /></a>
                                <script type="text/javascript">
                                  new Calendar({
                                          inputField: "end_time",
                                          dateFormat: "%d/%m/%Y",
                                          trigger: "end_time_trigger",
                                          bottomBar: false,
                                          onSelect: function() {
                                                  var date = Calendar.intToDate(this.selection.get());
                                                  LEFT_CAL.args.min = date;
                                                  LEFT_CAL.redraw();
                                                  this.hide();
                                          }
                                  });
                                </script>
                            </td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td height="30">&nbsp;</td>
                            <td>
                                <div style="margin-top:5px;">
                                    <input type="submit" value="Tìm sự kiện" class="blogButton" />
                                </div></td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                    </table>
                    </form>
                    <div class="clear"></div>
                </div>
                <div class="boxBottom"><span><b></b></span></div>
            </div>
            <!--End: findEvent-->